home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
MATHS
/
RLAB
/
RLAB125.ZIP
/
!RLaB
/
help_ai
/
COMPLEX
< prev
next >
Wrap
Text File
|
1994-02-21
|
888b
|
43 lines
COMPLEX:
RLaB supports COMPLEX data types. The "type" of a variable is
revealed by typing:
var.type
or
show(var)
In the 1st instance the return value is a string, in the 2nd
instance, the return value is a string matrix.
Complex variables can be used via the MATLAB syntax:
i = sqrt(-1)
z = 1 + 2*i
z = a + b*i
or with RLaB's complex constant feature:
z = 1 + 2i
z = 1 + 2j // equivalent to the previous statement
The complex constants `i' and `j' do not interfere with
ordinary variables `i' and `j' since the complex constants
must immediately follow a number to be interpreted as a
complex constant.
For example:
1i // valid complex constant
1 i // two separate statements
Wherever it makes sense, built-in functions will accept real,
and complex arguments. For example, inv(), det(), eig(), fft()
will accept both real and complex inputs.